package com.lixueju.security.box.web.service;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lixueju.security.box.core.model.AuthMenu;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 储存菜单信息 服务类
 * </p>
 *
 * @author lixueju
 * @since 2019-11-13
 */
public interface IAuthMenuService extends IService<AuthMenu> {

    List<AuthMenu> queryAllMenuByUserId(Long userId);

    IPage<AuthMenu> selectMenuPage(Page<AuthMenu> page, AuthMenu authMenu);

    Boolean addOrUpdateAuthMenu(AuthMenu authMenu);

    Boolean deleteAuthMenu(AuthMenu authMenu);

    Set<String> queryAllPermissionByUserId(Long userId);

    JSONArray menuTree();

    JSONArray menuTreeForPermission();

    List<AuthMenu> getAuthMenuListByChildrenIds(List<AuthMenu> authMenuList, Set<Long> childrenIds);

}
